It is a generally known requirement of certain computer graphic output devices to optimize digital input images prior to outputting them at a predefined output resolution (pixel density or raster density). Specifically, printer systems capable of printing image data and/or character data have become widely used. A particular problem arises when images that have been previously optimized for a specific printing technology are printed on a printer utilizing a different printing technology. "Write-black" refers Go an electrophotographic printing process in which the elements or portions of the image that will attract black toner for eventual transfer to a copy substrate are discharged with an exposure device, such as a laser. By contrast, "write-white" refers to an electrophotographic printing process in which the portions of the image that will not receive toner are discharged with an exposure device.
Thus, for example, images may be optimized for write-black printer technology, which tends to thicken elements such as lines because the optical input has a width greater than the pixel width, and subsequently transmitted to a write-white printer, which tends to thin elements because the discharged areas adjacent to lines areas spread into the domain of the line. Such images will appear undesirably lighter, because the original optimization for the expected write-black printer thins the elements in the image, and when such an optimized image is sent instead to a write-white printer, which further thins image elements, the result will be lines that are too thin. Single pixel lines will tend to be invisible.
To compensate for the differences in write-white versus write-black printers, the edges of image features are detected, and dilated (expanded) or eroded (shrunk). The increment of darkening or lightening is generally limited to one pixel, unless halfbitting techniques are used. Halfbitting is a technique for increasing the effective resolution of a printer for large coherent objects such as lines and curves. It involves approximating some boundaries of objects by alternating pixels along a line between white and black, effectively dilating or eroding that boundary by a half pixel. Halfbitting is used when dilation of a full bit might result in an image element that is too thick, or too dark.
FIG. 1 shows a portion of an image element 10. In optimizing an image formatted for write-black printing, edges are slightly eroded to account for the thickening properties of the print format. If, however, this optimized image were printed on a write-white printer, the same edge would then appear very thin. This can be corrected by slightly thickening, or dilating, a black object when reformatting the image for printing on a write-white printer. The outline 12 shows a desired dilation by one half bit for this image element. To approximate this thickening on a printer without changing the resolution of the image, a technique called "halfbitting" is used. This is accomplished by placing alternating black pixels along the edge of the object. With pixel 14 being black, pixel 16 is left white. The printed image element so halfbitted will appear about one half pixel thicker than a similar but non-halfbitted image element printed in the original, write-black optimized format on a write-white printer.
To accomplish dilation of an image element without increasing the resolution of the image, four conditions must be considered. FIGS. 2-5 illustrate the four possible conditions that must be considered in dilating an image element by a half or a full bit.
FIG. 2(a) shows a portion of an image element 20 that contains a smooth edge with no halfbitting. The first condition, a half bit expansion on an image without halfbitting is shown in FIG. 2(b), image element 22. The image element is expanded by adding alternating black bits along the edge of the element. Second, an image element with halfbitting may be expanded by another half bit, or "filled." FIG. 3 illustrates the second condition, in which a previously halfbitted image element 24 is filled by a further half bit dilation, as shown in FIG. 3(b). Again, halfbitting is accomplished by adding alternating black bits along the edge of the image element, resulting in a smoothing of the element, as shown by element 26.
In the third condition, a portion of image element 30 without halfbitting may also be expanded by a Full bit, as shown in FIG. 4(b) by image portion 32.
FIG. 5 shows the fourth condition, in which a portion of an image element 34 that includes a halfbitted edge is expanded by a full bit, as shown by image element portion 36. Alternate white pixels, such as pixel 38, are filled by black pixel 39 as shown in FIG. 5(b), in essentially the same manner as in the second case of half bit filling. An additional half bit dilation, as shown by pixel 40, completes the full bit dilation.
The considerations for eroding an image element are essentially the same, with an image element being shrunk by a half or full bit, or white pixels added to replace black pixels, instead of expanded.
Template matching techniques have been proposed for enhancing images by more precisely controlling the size, positioning and number of pixels that are printed on a xerographic photoreceptor to render bitmap images. Walsh et al., U.S. Pat. No. 4,437,122, describes a method of enhancing the resolution and quality of characters of a system receiving video display pixel information and providing hard copy output. The system accomplishes this by storing at least three successive lines of video data in successive parallel connected shift registers, applying the output of the shift registers to a decoder, and generating driving signals for a printer head. The decoder compares the pixels on the same line as well as in preceding and succeeding lines that surround each specific input pixel to generate the printer head driving signal according to whether straight or curved line segments are to be formed. Enhancement of the central pixel may be determined by progressively examining an ordered table of matches to find an equivalent image segment and its related enhancement, and outputting an increased resolution image portion with a plurality of bits, incorporating the enhancement to the target pixel.
As shown in FIG. 6, for example, for image element portion 50 a (3.times.3) pixel window 52 may be isolated in order to enhance pixel 54 using a template matching pixel enhancement method. As pixel window 52 is incrementally passed over an image element edge, its central pixel 54 is identified and is compared with the pixels surrounding it. Depending on the desired characteristics of the output image and the templates used, pixel 54 may be made black when it is adjoining the state transition, as shown in the figure. In most template matching enhancement techniques, the system will simply move to the next pixel for enhancement, in this case isolating pixel 56 within (3.times.3) pixel window 58. Without the information that the output for pixel 54 was made black, the same template match that indicated that pixel 54 should be black will indicate that pixel 56 should also be made black, since the surrounding pixel pattern in the (3.times.3) window is the same. This method will effectively dilate the image element by a full bit instead of a half bit.
Alternatively, pixel 54 may be expanded in resolution similar to the method shown in Walsh, so that a plurality of pixels would be generated to represent the enhancement to pixel 54. Although the plurality of pixels representing the enhancement to pixel 54 could be developed in order to provide halfbitting, the resolution of the image would be greater and would require a display device or printer capable of displaying the higher resolution enhanced image.
However, satisfying the first condition of image dilation described above, of applying halfbitting to an image element without any previous halfbitting, requires that at least two adjacent pixels must be enhanced in conjunction, so that changes to one pixel may be taken into account in the enhancement determination of the corrected state of the second. It is an object of the present invention to provide a method for performing half bit and full bit dilation or erosion on elements in an image without affecting the resolution of the original image.
Existing template matching enhancement techniques which produce for each input pixel an output of one or more enhanced output pixels may effectively produce enhanced outputs for the last three conditions. The method of the present invention is also effective in producing an enhanced output for the last three conditions, and can also provide enhanced output for the first condition, as well. In addition, by providing correction for 4 pixels in each pass rather than just one pixel at a time, the throughput for the system is significantly increased over systems which correct for each pixel individually.